/// API相关常量
class ApiConstants {
  /// 基础URL
  static const String baseUrl = 'https://api.jikan.moe/v4';
  
  /// 请求超时时间
  static const Duration timeout = Duration(seconds: 30);
  
  /// 缓存有效期配置
  static const Duration cacheValidDuration = Duration(hours: 1); // 默认缓存时间
  static const Duration shortCacheDuration = Duration(minutes: 15); // 短期缓存（最新剧集等）
  static const Duration longCacheDuration = Duration(hours: 6); // 长期缓存（排行榜等）
  
  /// 请求频率限制
  static const Duration rateLimitDelay = Duration(milliseconds: 500);
  
  /// 重试配置
  static const int maxRetries = 3;
  static const Duration retryDelay = Duration(seconds: 2);
  
  // 连接超时
  static const Duration connectTimeout = Duration(seconds: 15);
  static const Duration receiveTimeout = Duration(seconds: 15);
  
  // 分页
  static const int defaultPageSize = 20;
  static const int maxPageSize = 25; // Jikan API 限制
  
  // User Agent
  static const String userAgent = 'AniQuest/1.0 (Flutter App)';
  
  // 备用API (如果需要)
  static const String animeChanBaseUrl = 'https://api.animechan.io/v1';
  static const String aniListBaseUrl = 'https://graphql.anilist.co';
} 